package com.example.systemservice.controller;

import com.example.systemservice.feign.RemoteUserService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("system")
public class RemoteUserServiceController {

    private final RemoteUserService remoteUserService;

    RemoteUserServiceController(RemoteUserService remoteUserService){
        this.remoteUserService = remoteUserService;
    }

    @GetMapping("getUser")
    public Object getUser(){
        return remoteUserService.userInfo();
    }

}
